import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import('@/views/home.vue'),
    redirect: '/welcome',
    children: [
      {
        path: '/welcome', // 如果是重定向到父路由中那么就要加/
        component: () => import('@/components/welcome.vue'),
      },
      {

        path: '/zsgc', // 如果是重定向到父路由中那么就要加/
        component: () => import('@/page/vueBasics/zsgc.vue'),
      },
      {
        path: '/qxfx', // 如果是重定向到父路由中那么就要加/
        component: () => import('@/page/vueBasics/qxfx.vue'),
      },
      {
        path: '/lbt', // 如果是重定向到父路由中那么就要加/
        component: () => import('@/page/vueBasics/lbt.vue'),
      },
      {
        path: '/ast', // 如果是重定向到父路由中那么就要加/
        component: () => import('@/page/es6Review/AST.vue'),
      },
      {
        path: '/arr', // 如果是重定向到父路由中那么就要加/
        component: () => import('@/page/es6Review/arr.vue'),
      },


    ],
  },
  {
    path: '*',
    component: () => import('@/components/404not.vue')
  }

]

const router = new VueRouter({
  routes
})

export default router
